

#ifndef __VERTEXBUFFER_GL15_H__
#define __VERTEXBUFFER_GL15_H__

#include <GL/glew.h>
#include <gfx/ivertexbuffer.h>

/**
 * \addtogroup opengl
 * @{
 */

/**
 * @brief OpenGL 1.5 implemenation of the iVertexBuffer interface.
 */
class ceVertexBufferGL15 : public iVertexBuffer
{
  CE_OBJECT
private:
  GLuint	name;

public:
  ceVertexBufferGL15 ();
  virtual ~ceVertexBufferGL15 ();

  bool CreateBuffer (unsigned size, const void* data, ceBufferDataMode mode);

  bool Copy (unsigned offset, unsigned size, const void* data);

  bool Lock (unsigned offset, void** buffer, ceBufferAccessMode mode);

  bool Unlock ();


  void* Bind ();

};

/** @} */

#endif /* ! __VERTEXBUFFER_GL15_H__ */
